home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-06-13 | 1.1 KB | 75 lines | [TEXT/MPS ] |
- #include "CPlusXCMD.h"
-
- #pragma segment MAIN
-
- TDig myObj1;
-
- pascal void
- Main(XCmdPtr paramPtr)
- {
- StringHandle ResultString = StringHandle(NewHandle(256));
- if (ResultString != 0L)
- {
- char temps[256];
- myObj1.GetDaveAndAllan(temps);
- BlockMove(temps, Ptr(*ResultString), strlen(temps)+1);
- paramPtr->returnValue = Handle(ResultString);
- };
- }
-
- TDittle::TDittle()
- {
- DebugStr("\pTDittle::TDittle");
- dave << "Evad";
- }
-
- TDittle::~TDittle()
- {
- DebugStr("\pTDittle::~TDittle");
- dave << "";
- }
-
- char * TDittle::GetDave(void)
- {
- DebugStr("\pTDittle::GetAllan");
- return(dave.str());
- }
-
-
- TDig::TDig()
- {
- DebugStr("\pTDig::TDig");
- allan << "Allan";
- }
-
- TDig::~TDig()
- {
- DebugStr("\pTDig::~TDig");
- allan << "";
- }
-
- char * TDig::GetDave(void)
- {
- DebugStr("\pTDig::GetDave");
- strstream s;
- s << "Dave";
- return(s.str());
- }
-
-
- char * TDig::GetAllan(void)
- {
- DebugStr("\pTDig::GetAllan");
- return(allan.str());
- }
-
-
- char * TDig::GetDaveAndAllan(char * astr)
- {
- DebugStr("\pTDig::GetDaveAndAllan");
- strstream scratch;
- scratch << GetDave() << " & " << GetAllan();
- strcpy(astr, scratch.str());
- return(astr);
- }
-